# _*_ encoding: utf-8 _*_
"""
@Softwave: Pycharm
@Python: 3.X
@Author: SKYNE
@Contact: 520@skyne.cn
@Time: 2017.10.22
"""

import socket

def Login(Stu_ID):
    HOST = '127.0.0.1'
    PORT = 3434
    BUFF_SIZE = 1024
    S = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    S.connect((HOST, PORT))
    print("已成功连接至 {} : {}\n".format(HOST, PORT))
    S.send(Stu_ID.encode('utf-8'))
    data = S.recv(BUFF_SIZE)
    print(data.decode('utf-8'))
    S.close()

if __name__ == '__main__':
    Stu_ID = "15031310170"
    Login(Stu_ID)